﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CodeBuilder.Service;
using CodeBuilder.DBM;

namespace CodeBuilder
{
    public partial class FrmOperation : Form
    {
        public FrmOperation()
        {
            InitializeComponent();
            InitForm();
        }

        private void InitForm()
        {
            tbxServer.Text = DBManager.server;
            tbxUid.Text = DBManager.uid;
            tbxPwd.Text = DBManager.pwd;
            tbxDB.Text = DBManager.database;
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            Services s = new Services();
            //s.ChangeServer(this.tbxServer.Text);
            s.InitConnectionInfo(tbxServer.Text, tbxUid.Text, tbxPwd.Text, tbxDB.Text);
            this.Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}